﻿using BonjourQuotation.UI.Models.BaseModel;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Web;
using System.Web.WebPages.Html;

namespace BonjourQuotation.UI.Models.PartialModel
{
    public class OperationHotelGridViewModel : UserAllPermissionsViewModel
    {
        public double LeftScrollPossition { get; set; }
        public double TopScrollPossition { get; set; }
        public bool IsCanPrev { get; set; }
        public bool IsCanNext { get; set; }
        public string Count { get; set; }
        public int CountCheck { get; set; }
        public List<OperationHotelGridRowViewModel> Rows { get; set; }
        public List<OperationHotelVendorInfoViewModel> VendorInfo { get; set; }
        public List<OperationHotelGridSaveRowViewModel> SaveRows { get; set; }
        public int HotelPageNumber { get; set; }
        // Group status
        public List<CheckBoxControlViewModel> HotelFilterGroupStatus { get; set; }
        public List<CheckBoxControlViewModel> HotelFilterSelGroupStatus { get; set; }
        public List<string> SelectedFilterGroupStatus { set; get; }
        // Estimated Number Rooms
        public List<CheckBoxControlViewModel> HotelFilterEstNumberRoom { get; set; }
        public List<CheckBoxControlViewModel> HotelFilterSelEstNumberRoom { get; set; }
        public List<string> SelectedFilterEstNumberRoom { set; get; }
        // status
        public List<CheckBoxControlViewModel> HotelFilterStatus { get; set; }
        public List<CheckBoxControlViewModel> HotelFilterSelStatus { get; set; }
        public List<string> SelectedFilterStatus { set; get; }
        // Vendor Name
        public List<CheckBoxControlViewModel> HotelFilterVendorName { get; set; }
        public List<CheckBoxControlViewModel> HotelFilterSelVendorName { get; set; }
        public List<string> SelectedFilterVendorName { set; get; }
        // Vendor City
        public List<CheckBoxControlViewModel> HotelFilterVendorCity { get; set; }
        public List<CheckBoxControlViewModel> HotelFilterSelVendorCity { get; set; }
        public List<string> SelectedFilterVendorCity { set; get; }
        // Day of Arrival
        public List<CheckBoxControlViewModel> HotelFilterDayofArrival { get; set; }
        public List<CheckBoxControlViewModel> HotelFilterSelDayofArrival { get; set; }
        public List<string> SelectedFilterDayofArrival { set; get; }
        // Month of Arrival
        public List<CheckBoxControlViewModel> HotelFilterMonthofArrival { get; set; }
        public List<CheckBoxControlViewModel> HotelFilterSelMonthofArrival { get; set; }
        public List<string> SelectedFilterMonthofArrival { set; get; }
        // Arrival City
        public List<CheckBoxControlViewModel> HotelFilterArrivalCity { get; set; }
        public List<CheckBoxControlViewModel> HotelFilterSelArrivalCity { get; set; }
        public List<string> SelectedFilterArrivalCity { set; get; }
        // Group Code
        public List<CheckBoxControlViewModel> HotelFilterGroupCode { get; set; }
        public List<CheckBoxControlViewModel> HotelFilterSelGroupCode { get; set; }
        public List<string> SelectedFilterGroupCode { set; get; }
        // Group Name
        public List<CheckBoxControlViewModel> HotelFilterGroupName { get; set; }
        public List<CheckBoxControlViewModel> HotelFilterSelGroupName { get; set; }
        public List<string> SelectedFilterGroupName { set; get; }
        // Customer
        public List<CheckBoxControlViewModel> HotelFilterCustomerCode { get; set; }
        public List<CheckBoxControlViewModel> HotelFilterSelCustomerCode { get; set; }
        public List<string> SelectedFilterCustomerCode { set; get; }

        // Filter Remove
        public bool IsRemoveFilterDivShow { set; get; }
        public bool IsRemoveCustomerCodeFilter { set; get; }
        public bool IsRemoveGroupCodeFilter { set; get; }
        public bool IsRemoveGroupNameFilter { set; get; }
        public bool IsRemoveVendorNameFilter { set; get; }
        public bool IsRemoveVendorCityFilter { set; get; }
        public bool IsRemoveStatusFilter { set; get; }
        public bool IsRemoveGroupStatusFilter { set; get; }
        public bool IsRemoveArrivalCityFilter { set; get; }
        public bool IsRemoveEstNumberRoomFilter { set; get; }
        public bool IsRemoveDayofArrivalFilter { set; get; }
        public bool IsRemoveMonthofArrivalFilter { set; get; }
        // Hide Show
        public bool ViewGroupCode { set; get; }
        public bool ViewCustomerCode { set; get; }
        public bool ViewDetails { set; get; }
        public bool ViewGroupStatus { set; get; }
        public bool ViewGroupName { set; get; }
        public bool ViewArrivalDate { set; get; }
        public bool ViewDepartureDate { set; get; }
        public bool ViewRoomCount { set; get; }
        public bool ViewEmployee { get; set; }
        public bool ViewVendorStatus { set; get; }
        public bool ViewVendorName { set; get; }
        public bool ViewVendorCity { set; get; }
        public bool ViewVendorAddress { set; get; }
        public bool ViewVendorPhone { set; get; }
        public bool ViewPax { set; get; }
        public bool ViewArrivalCity { set; get; }
        //public bool ViewDepartureCity { set; get; }
        public bool ViewNights { set; get; }
        public bool ViewFileCompDays { set; get; }
        public bool ViewTotalCost { set; get; }
        public bool ViewBreakDownTotal { set; get; }
        public bool ViewOutstandingBalance { set; get; }
        public bool ViewComAmount { set; get; }
        public bool ViewComDifference { set; get; }
        public bool ViewCurrency { set; get; }
        public bool ViewTotalInvoice { set; get; }
        public bool ViewTotalPaid { set; get; }
        public bool ViewFirstPayment { set; get; }
        public bool ViewFirstPaymentMethod { set; get; }
        public bool ViewDateFirstPayment { set; get; }
        public bool ViewSecondPayment { set; get; }
        public bool ViewSecondPaymentMethod { set; get; }
        public bool ViewDateSecondPayment { set; get; }
        public bool ViewThirdPayment { set; get; }
        public bool ViewThirdPaymentMethod { set; get; }
        public bool ViewDateThirdPayment { set; get; }
        public bool ViewRefundReceivedHotel { set; get; }
        public bool ViewTotalCharged { set; get; }
        public bool ViewAuthDiff { set; get; }
        public bool ViewAccountingMemo { set; get; }
        public bool ViewCommissionStatus { set; get; }
        public bool ViewCommissionPrc { set; get; }
        public bool ViewCommissionReceived { set; get; }
        public bool ViewCommissionDateReceived { set; get; }
        public bool ViewCheckNumber { set; get; }
        public bool ViewCheckAmount { set; get; }
        public bool ViewSGLCount { set; get; }
        public bool ViewSGLAmount { set; get; }
        public bool ViewDBLCount { set; get; }
        public bool ViewDBLAmount { set; get; }
        public bool ViewTWNCount { set; get; }
        public bool ViewTWNAmount { set; get; }
        public bool ViewTRPLCount { set; get; }
        public bool ViewTRPLAmount { set; get; }
        public bool ViewQUDCount { set; get; }
        public bool ViewQUDAmount { set; get; }
        public bool ViewGuideCount { set; get; }
        public bool ViewGuideAmount { set; get; }
        public bool ViewDriverCount { set; get; }
        public bool ViewDriverAmount { set; get; }
        public bool ViewTaxPrc { set; get; }
        public bool ViewOccTax { set; get; }
        public bool ViewBag { set; get; }
        public bool ViewCBF { set; get; }
        public bool ViewABF { set; get; }
        public bool ViewLunch { set; get; }
        public bool ViewDinner { set; get; }
        public bool ViewVConfHtml { set; get; }
        public bool ViewComp { set; get; }
        public bool ViewExtraCost { set; get; }
        public bool ViewXLTDate { set; get; }
        public bool ViewDateFileReceived { set; get; }
        public bool ViewDateFileCompleted { set; get; }
        public bool ViewDayOfArrival { set; get; }
        public bool ViewMonthOfArrival { set; get; }
        public bool ViewClientBookingCode { set; get; }
        public bool ViewCheckInDate { set; get; }
        public bool ViewCheckOutDate { set; get; }
        public bool ViewEstimatedNumberRooms { set; get; }
        public bool ViewEstimatedNumberPax { set; get; }
        public bool ViewQuotaRoom { set; get; }
        public bool ViewQuotaRoomDiff { set; get; }
        public bool ViewQuotaTax { set; get; }
        public bool ViewQuotaOccTax { set; get; }
        public bool ViewQuotaBrk { set; get; }
        public bool ViewQuotaLg { set; get; }
        public bool ViewQuotaNight { set; get; }
        public bool ViewQuotaVendorName { set; get; }
        public bool ViewQuotaNote { set; get; }     
        public bool ViewConfirmed { set; get; }
        public bool ViewVendorEmail { set; get; }
        public bool ViewVendorContactName { set; get; }
        public bool ViewVendorTech { set; get; }
        public bool ViewVendorNote { set; get; }
        // for filtering, update, hide show, 
        public bool IsFilter { set; get; }
        public bool IsView { set; get; }
        public bool IsUpdate { set; get; }
        public bool IsSearch { set; get; }
        // grid drop down values
        public List<SelectListItem> Employee { get; set; }
        public List<SelectListItem> GroupStatus { get; set; }
        public List<SelectListItem> VendorStatus { get; set; }
        public List<SelectListItem> Currency { get; set; }
        public string SelectedCurrency { get; set; }
        public List<SelectListItem> PaymentMethod { get; set; }
        public List<SelectListItem> CommissionStatus { get; set; }
        public string SelectedFirstPaymentMethod { get; set; }
        public string SelectedSecondPaymentMethod { get; set; }
        public string SelectedThirdPaymentMethod { get; set; }
        public string SelectedCommissionStatus { get; set; }
        // Search Part
        [DisplayName("Arrival Date From:")]
        public string SearchCheckInFromDate { get; set; }
        [DisplayName("Arrival Date To:")]
        public string SearchCheckInToDate { get; set; }
        [DisplayName("Departure Date From:")]
        public string SearchCheckOutFromDate { get; set; }
        [DisplayName("Departure Date To:")]
        public string SearchCheckOutToDate { get; set; }
        [DisplayName("Arrival City:")]
        public List<SelectListItem> SearchArrivalCity { get; set; }
        public string SelectedSearchArrivalCity { get; set; }
        [DisplayName("Departure City:")]
        public List<SelectListItem> SearchDepartureCity { get; set; }
        public string SelectedSearchDepartureCity { get; set; }
        [DisplayName("Nationality:")]
        public List<SelectListItem> SearchNationality { get; set; }
        public string SelectedSearchNationality { get; set; }
        [DisplayName("Status:")]
        public List<SelectListItem> SearchStatus { get; set; }
        public string SelectedSearchStatus { get; set; }
        [DisplayName("Customer:")]
        public string SearchCustomer { get; set; }
        [DisplayName("Vendor Name:")]
        public string SearchVendorName { get; set; }
        [DisplayName("Group Name:")]
        public string SearchGroupName { get; set; }
        [DisplayName("GroupCode:")]
        public string SearchGroupCode { get; set; }
        [DisplayName("Employee:")]
        public string SearchEmployee { get; set; }
        public int SearchEmployeeID { get; set; }
        [DisplayName("Group #:")]
        public string GroupId { get; set; }
        [DisplayName("Flight Info:")]
        public string SearchFlightNo { get; set; }
        // Hotel Totals
        [DisplayName("Total Cost:")]
        public string OutstandingBalanceSum { get; set; }
        [DisplayName("Total Com Amt:")]
        public string ComAmtSum { get; set; }
        [DisplayName("Total Com Rec:")]
        public string ComReceivedAmtSum { get; set; }
        [DisplayName("Out Com Amt:")]
        public string OutsatndingComAmtSum { get; set; }
        [DisplayName("Total Paid:")]
        public string TotalPaidSum { get; set; }
        [DisplayName("Total Out Pay:")]
        public string OutsatndingPaymentSum { get; set; }
        [DisplayName("Total Room Diff:")]
        public string QuotaRoomDiffSum { get; set; }
        [DisplayName("Grp Profit:")]
        public string GroupProfit { get; set; }
        [DisplayName("Total Invoice:")]
        public string TotInvoice { get; set; }
        [DisplayName("Profit %:")]
        public string ProfitPers { get; set; }
        public decimal TotInv { get; set; }
        public decimal TotInvCad { get; set; }
        public decimal TotCost { get; set; }
        public decimal TotCostCad { get; set; }
    }
    [Serializable]
    public class OperationHotelGridRowViewModel
    {
        public string GroupID { get; set; }
        public string GroupCode { get; set; }
        public string GroupName { get; set; }
        public string GroupBookedUnder { get; set; }
        public string CustomerCode { get; set; }
        public string SelectedEmployee { get; set; }
        public string EstNoOfPerson { get; set; }
        public string NoOfPerson { get; set; }
        public string ArrivalDate { get; set; }
        public string ArrivalCity { get; set; }
        public string DepartureDate { get; set; }
        //public string DepartureCity { get; set; }
        public string SelectedGroupStatus { get; set; }
        public string SelectedVendorStatus { get; set; }
        public string RoomCount { get; set; }
        public string FileCompDays { get; set; }
        public string Nights { get; set; }
        public string TotalCost { get; set; }
        public string BreakDownTotal { get; set; }
        public string OutstandingBalance { get; set; }
        public string AuthDiff { get; set; }
        public string ComAmount { get; set; }
        public string ComDifference { get; set; }
        public string SelectedCurrency { get; set; }
        public string TotalInvoice { get; set; }
        public string TotalPaid { get; set; }
        public string FirstPayment { get; set; }
        public string FirstPaymentMethod { get; set; }
        public string DateFirstPayment { get; set; }
        public string SecondPayment { get; set; }
        public string SecondPaymentMethod { get; set; }
        public string DateSecondPayment { get; set; }
        public string ThirdPayment { get; set; }
        public string ThirdPaymentMethod { get; set; }
        public string DateThirdPayment { get; set; }
        public string RefundReceivedHotel { get; set; }
        public string TotalCharged { get; set; }
        public string AccountingMemo { get; set; }
        public string SelectedCommissionStatus { get; set; }
        public string CommissionPrc { get; set; }
        public string CommissionReceived { get; set; }
        public string CommissionDateReceived { get; set; }
        public string CheckNumber { get; set; }
        public string CheckAmount { get; set; }
        public string SGLCount { get; set; }
        public string SGLAmount { get; set; }
        public string DBLCount { get; set; }
        public string DBLAmount { get; set; }
        public string TWNCount { get; set; }
        public string TWNAmount { get; set; }
        public string TRPLCount { get; set; }
        public string TRPLAmount { get; set; }
        public string QUDCount { get; set; }
        public string QUDAmount { get; set; }
        public string GuideCount { get; set; }
        public string GuideAmount { get; set; }
        public string DriverCount { get; set; }
        public string DriverAmount { get; set; }
        public string TaxPrc { get; set; }
        public string OccTax { get; set; }
        public string Bag { get; set; }
        public string CBF { get; set; }
        public string ABF { get; set; }
        public string Lunch { get; set; }
        public string Dinner { get; set; }
        public bool BagChecked { get; set; }
        public bool CBFChecked { get; set; }
        public bool ABFChecked { get; set; }
        public bool LunchChecked { get; set; }
        public bool DinnerChecked { get; set; }
        public string VConfHtml { get; set; }
        public string PayMeth1FormHtml { get; set; }
        public string PayMeth2FormHtml { get; set; }
        public string PayMeth3FormHtml { get; set; }
        public string VendorContractHtml { get; set; }
        public string VendorGroupContractHtml { get; set; }
        public string Comp { get; set; }
        public string ExtraCost { get; set; }
        public string XLTDate { get; set; }
        public string DateFileReceived { get; set; }
        public string DateFileCompleted { get; set; }
        public string DayOfArrival { get; set; }
        public string MonthOfArrival { get; set; }
        public string ClientBookingCode { get; set; }
        public string CheckInDate { get; set; }
        public string CheckOutDate { get; set; }
        public string EstimatedNumberRooms { get; set; }
        public string QuotaRoom { get; set; }
        public string QuotaRoomDiff { get; set; }
        public string QuotaTax { get; set; }
        public string QuotaOccTax { get; set; }
        public string QuotaBrk { get; set; }
        public string QuotaLg { get; set; }
        public string QuotaNight { get; set; }
        public string QuotaVendorName { get; set; }
        public string QuotaNote { get; set; }
        public string Confirmed { get; set; }
        public string VendorName { get; set; }
        public int VendorID { get; set; }
        public string NewVendorID { get; set; }
        public string VendorAddress { get; set; }
        public string VendorPhone { get; set; }
        public string VendorEmail { get; set; }
        public string VendorContactName { get; set; }
        public string VendorCity { get; set; }
        public string VendorTech { get; set; }
        public string VendorNote { get; set; }   
    }
    public class OperationHotelGridSaveRowViewModel
    {
        public int GroupID { get; set; }
        public int VendorID { get; set; }
        public string NewVendorID { get; set; }
        public string ArrivalDate { get; set; }
        public string ArrivalCity { get; set; }
        public string BookedUnder { get; set; }
        public string DepartureDate { get; set; }
        public int SelectedEmployeeID { get; set; }
        public int SelectedGroupStatus { get; set; }
        public int SelectedVendorStatus { get; set; }
        public string AccountingMemo { get; set; }
        public string ClientBookingCode { get; set; }
        public decimal? ExtraCost { get; set; }
        public decimal? RefundReceivedHotel { get; set; }
        public decimal? TotalInvoice { get; set; }
        public decimal? TotalCharged { get; set; }
        public string FirstPayment { get; set; }
        public string SelectedFirstPaymentMethod { get; set; }
        public string DateFirstPayment { get; set; }
        public string SecondPayment { get; set; }
        public string SelectedSecondPaymentMethod { get; set; }
        public string DateSecondPayment { get; set; }
        public string ThirdPayment { get; set; }
        public string SelectedThirdPaymentMethod { get; set; }
        public string DateThirdPayment { get; set; }
        public string CommissionPerc { get; set; }
        public string CommissionStatus { get; set; }
        public string CommissionRecAmt { get; set; }
        public string CommissionRecDate { get; set; }
        public string CommissionCheckNum { get; set; }
        public string CommissionCheckAmt { get; set; }
        public string Luggage { get; set; }
        public string ABF { get; set; }
        public string CBF { get; set; }
        public string Lunch { get; set; }
        public string Dinner { get; set; }
        public bool LuggageChecked { get; set; }
        public bool ABFChecked { get; set; }
        public bool CBFChecked { get; set; }
        public bool LunchChecked { get; set; }
        public bool DinnerChecked { get; set; }
        public string Tax { get; set; }
        public string OccTax { get; set; }
        public string SingleAmt { get; set; }
        public string DoubleAmt { get; set; }
        public string TwinAmt { get; set; }
        public string TrpAmt { get; set; }
        public string QuadAmt { get; set; }
        public string GuideAmt { get; set; }
        public string DriverAmt { get; set; }
        public string Comp { get; set; }
        public string Notes { get; set; }
    }

    public class OperationHotelVendorInfoViewModel
    {
        public int VendorID { get; set; }
        public string VendorName { get; set; }
        public string VendorCity { get; set; }
        public string VendorAddress { get; set; }
        public string VendorPhone { get; set; }
        public string VendorEmail { get; set; }
        public string VendorContactPerson { get; set; }
        public bool VendorIsFind { get; set; }
    }
}